/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sdc.utility;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author yokoe
 */
public class Tuple<K, V> {

	private Map<K, List<V>> innerMap;

	public Tuple()
	{
		innerMap = new HashMap<K, List<V>>();
	}

	public List<V> get(K key)
	{
		return innerMap.get(key);
	}

	public void put(K key, V value)
	{
		if(innerMap.containsKey(key) == false)
		{
			innerMap.put(key, new ArrayList<V>());
		}

		innerMap.get(key).add(value);
	}
}
